<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head th:replace="fragment :: head(~{::title})">
    <title>帖子管理</title>
</head>

<body>
<!--导航栏-->
<!--头部导航-->
<nav th:replace="admin/admin-fragment :: menu(2)">

</nav>
<!--<div class="ui attached pointing menu">-->
<!--    <div class="ui container">-->
<!--        <div class="right menu">-->
<!--            <a href="#" class=" item">发布</a>-->
<!--            <a href="#"  class="teal active item">列表</a>-->
<!--        </div>-->
<!--    </div>-->
<!--</div>-->


<!--中间内容-->
<div class="m-padded-tb-tiny m-margin-top-massive">
<!--    ui container响应式布局-->
    <div class="ui container ">

        <table class="ui compact celled teal table">
            <thead>
            <tr>
                <th>序列号</th>
                <th>标题</th>
<!--                <th>类型</th>-->
<!--                <th>推荐</th>-->
                <th>评论</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="forum, iterStat : ${pageInfo.list}">
                <td th:text="${iterStat.count}">1</td>
                <td th:text="${forum.title}">刻意练习清单</td>
<!--                <td th:text="${forum.type.name}">认知升级</td>-->
<!--                <td th:text="${forum.recommend} ? '是':'否'">是</td>-->
                <td th:text="${forum.commentabled} ? '是':'否'">发布</td>
                <td th:text="${#dates.format(forum.createTime,'yyyy-MM-dd')}">2020-8-02</td>
                <td>
                    <a href="#" th:href="@{/admin/forums/{id}/edit(id=${forum.id})}" class="ui mini teal basic button">编辑</a>
                    <a href="#" th:href="@{/admin/forums/{id}/delete(id=${forum.id})}" class="ui mini red basic button">删除</a>
                </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
                <th colspan="7">
                    <div class="ui mini pagination menu"   >
                        <div class="item"><a th:href="@{/admin/forums}">首页</a></div>
                        <div class="item"><a th:href="@{/admin/forums(pagenum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a></div>
                        <div class="item"><a th:href="@{/admin/forums(pagenum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a></div>
                        <div class="item"><a th:href="@{/admin/forums(pagenum=${pageInfo.pages})}">尾页</a></div>
                    </div>
                    <a href="#"   th:href="@{/admin/forums/input}"  class="ui  mini right floated teal basic button">添加</a>
                </th>
            </tr>
            </tfoot>
        </table>
</div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<!--底部footer-->
<footer th:replace="admin/admin-fragment :: footer">

</footer>


<th:block th:replace="admin/admin-fragment :: script">

</th:block>


</footer>
<script>
   $(".menu.toggle").click(function () {
        $(".m-item").toggleClass("m-mobile-hide");
   })

   $('.ui.dropdown').dropdown({
       on : "hover"
   });
</script>

</body>
</html>
